#include <iostream>
using std::cout;
using std::endl;
//菱形继承
class A{
public:
    void print(){
        cout << "A::print()" << endl;
    }
};
class B: public A{

};
class C : public A{

};
class D: public B, public C{

};


void test(){
    D d;
    d.print();
}

int main()
{
    test();
    return 0;
}

